<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<title></title>
</head>

<body>
	<script type="text/javascript">
		function Gen(time) {
			return new Promise((resolve, reject) => {
				setTimeout(() => {
					resolve(time)
				}, time)
			})
		}
		async function test() {
			let arr = [Gen(1000), Gen(2000), Gen(5000)]
			for await (let item of arr) {
				console.log(Date.now(), item)
			}
		}
		test()
	</script>
</body>

</html>